﻿<UserControl x:Class="BTM_Client_Application.RealTimeFilter.StringFilterElementControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="308" d:DesignWidth="243" Background="Transparent">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Styles/UserControls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Styles/MyResources.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Border CornerRadius="5" Padding="4" Background="White" BorderThickness="2">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto" MaxWidth="150"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Border Grid.ColumnSpan="2" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource AccentColorBrush}">
                <Label Name="Title" Content="Title" HorizontalAlignment="Center" VerticalAlignment="Top" />
            </Border>
            <Border Visibility="Visible" Name="ListContainer" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Stretch">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <StackPanel Orientation="Horizontal" Margin="0,0,2,0">
                        <CheckBox Name="ListCheckBox" VerticalAlignment="Center" Margin="10,0,0,0" Grid.Row="0" Click="ListCheckBox_OnClick"/>
                        <Label Name="ListLabel" Content="List" VerticalAlignment="Center"/>
                    </StackPanel>
                    <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" MaxHeight="500" >
                        <ListView Name="FilterItemsList" Margin="0,2,2,0" Grid.Row="1" SelectionMode="Multiple" ItemContainerStyle="{StaticResource ListViewItemNoHighlightStyle}"/>
                    </ScrollViewer>
                </Grid>
            </Border>

            <Border Name="ContainsContainer" Grid.Column="1" Grid.Row="1" BorderThickness="1,0,0,0" BorderBrush="{DynamicResource AccentColorBrush}">
                <Grid Grid.Column="1" Grid.Row="1">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <StackPanel Orientation="Horizontal">
                        <CheckBox Name="ContainsCheckBox" VerticalAlignment="Center" Margin="10,0,0,0" Grid.Row="0" Grid.Column="1" Click="ContainsCheckBox_OnClick"/>
                        <Label Name="ContainsLabel" Content="Contains"/>
                    </StackPanel>
                    <TextBox Name="FilterContainsBox" Grid.Row="1" TextWrapping="Wrap" Margin="2,2,0,0" AcceptsReturn="True" MaxWidth="150" TextChanged="FilterContainsBox_OnTextChanged"/>
                    
                </Grid>
            </Border>


        </Grid>
    </Border>
</UserControl>
